/*
 * @Author: zi.yang
 * @Date: 2022-02-02 21:35:44
 * @LastEditors: zi.yang
 * @LastEditTime: 2022-02-08 20:09:25
 * @Description: In User Settings Edit
 * @FilePath: \api-generator\app\controller\home.js
 */
'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const { ctx } = this;
    await ctx.render('home.njk');
  }

  async GetGetSwaggerDoc() {
    const { ctx } = this;
    const result = await ctx.service.home.getSwaggerDoc(ctx.request.query);
    ctx.body = result;
  }

  async GetGenerateToPostman() {
    const { ctx } = this;
    const result = await ctx.service.home.generateToPostman(ctx.request.query);
    ctx.body = result;
  }
}

module.exports = HomeController;
